home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Surfer: Getting Started
/
Internet Surfer - Getting Started (Wayzata Technology)(7231)(1995).bin
/
pc
/
mac
/
bonus
/
peter_le
/
talk_sou
/
my_libra
/
myhandle.uni
< prev
next >
Wrap
Text File
|
1992-04-20
|
1KB
|
57 lines
unit MyHandleQuitBoth;
{ This program was written by Peter N Lewis, Mar 1992 in THINK Pascal 4.0.1 }
interface
procedure InitQuitBoth (creator: OSType);
procedure FinishQuitBoth;
implementation
uses
BaseGlobals, MySystem7, MyFMenus, AppGlobals;
var
quitBoth: boolean;
creatorType: OSType;
procedure DoQuit;
begin
quitNow := true;
if quitBoth then
QuitApplication(creatorType);
end;
procedure SetQuit (themenu, theitem: integer);
var
dummyb: boolean;
er: eventRecord;
nqb: boolean;
process: processSerialNumber;
s: str255;
begin
dummyb := GetOSEvent(0, er);
nqb := (BAND(er.modifiers, optionKey) <> 0) & GetPSN(creatorType, process);
if nqb <> quitBoth then begin
quitBoth := nqb;
if quitBoth then
GetIndString(s, quitBothStrhID, quitBothQuitBothStrhIndex)
else
GetIndString(s, quitBothStrhID, quitBothQuitStrhIndex);
SetItem(GetMHandle(themenu), theitem, s);
end;
end;
procedure InitQuitBoth (creator: OSType);
begin
quitBoth := false;
creatorType := creator;
SetFBoth(CQuit, @DoQuit, @SetQuit);
end;
procedure FinishQuitBoth;
begin
end;
end.